﻿<UserControl x:Class="Agnes.TaskManager.TaskPadView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             FontFamily="SimSun" FontSize="13"
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <StackPanel Margin="5" Orientation="Horizontal" >
            <TextBlock Text="查询:" Margin="10,0" VerticalAlignment="Center" />
            <ComboBox Background="White" SelectedIndex="{Binding Path=Type,Mode=TwoWay}" >
                <ComboBox.Items>
                    <ComboBoxItem Content="最近一周" IsSelected="True"/>
                    <ComboBoxItem Content="最近一个月" />
                    <ComboBoxItem Content="全部" />
                </ComboBox.Items>
            </ComboBox>
        </StackPanel>
        <TreeView Grid.Row="1" >
            <TreeViewItem Header="需要启动的任务" ItemsSource="{Binding Path=PrepareTask}">
                <TreeViewItem.ItemTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding Path=Subject, Mode=TwoWay}" MouseLeftButtonDown="TextBlock_MouseLeftButtonDown"/>
                    </DataTemplate>
                </TreeViewItem.ItemTemplate>
            </TreeViewItem>
            <TreeViewItem Header="进行中的任务" ItemsSource="{Binding Path=ProgressTask}" >
                <TreeViewItem.ItemTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding Path=Subject, Mode=TwoWay}" MouseLeftButtonDown="TextBlock_MouseLeftButtonDown"/>
                    </DataTemplate>
                </TreeViewItem.ItemTemplate>
            </TreeViewItem>
            <TreeViewItem Header="快要过期的任务" ItemsSource="{Binding Path=FinishingTask}" >
                <TreeViewItem.ItemTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding Path=Subject, Mode=TwoWay}" MouseLeftButtonDown="TextBlock_MouseLeftButtonDown"/>
                    </DataTemplate>
                </TreeViewItem.ItemTemplate>
            </TreeViewItem>
            <TreeViewItem Header="过期的任务" ItemsSource="{Binding Path=OutofDateTask}" >
                <TreeViewItem.ItemTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding Path=Subject, Mode=TwoWay}" MouseLeftButtonDown="TextBlock_MouseLeftButtonDown"/>
                    </DataTemplate>
                </TreeViewItem.ItemTemplate>
            </TreeViewItem>
        </TreeView>
    </Grid>
</UserControl>
